
require "skynet.manager"
local skynet = require "skynet"
local Hotfix = require("Hotfix")
local MessageDispatch = import( "MessageDispatch")
local MessageHandler = import( "manager.MessageHandler")


global = {}
local function init()
	local hotfix = Hotfix.new()
	hotfix:start()
	global.hotfix = hotfix
	local message_dispatch = MessageDispatch.new()	
	local message_handler = MessageHandler.new(message_dispatch)

	skynet.dispatch("lua", message_dispatch:dispatchLua())	
		
end

---------------------------------------------------------
-- skynet
---------------------------------------------------------

skynet.start(function()

	init()
	
	skynet.register('.manager')
end)
